/*
 * Copyright (C) 2012 Le Tuan Anh <anh.takaji@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package ezcms.dto;

import java.io.Serializable;

/**
 * A file uploaded by user
 *
 * @author Le Tuan Anh <anh.takaji@gmail.com>
 */
public class FileResource implements Serializable {

    private long id;
    private User owner;
    private String filename;
    private String description;
    private String physicalPath;

    public FileResource() {
    }

    public FileResource(User owner, String filename, String description, String physicalPath) {
        this.owner = owner;
        this.filename = filename;
        this.description = description;
        this.physicalPath = physicalPath;
    }

    @Override
    public String toString() {
        return "FileResource{" + "id=" + id + ", owner=" + (owner == null ? "null" : owner.getEmail()) + ", filename=" + filename + ", description=" + description + ", physicalPath=" + physicalPath + '}';
    }

    /**
     * @return the id
     */
    public long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(long id) {
        this.id = id;
    }

    /**
     * @return the owner
     */
    public User getOwner() {
        return owner;
    }

    /**
     * @param owner the owner to set
     */
    public void setOwner(User owner) {
        this.owner = owner;
    }

    /**
     * @return the filename
     */
    public String getFilename() {
        return filename;
    }

    /**
     * @param filename the filename to set
     */
    public void setFilename(String filename) {
        this.filename = filename;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the physicalPath
     */
    public String getPhysicalPath() {
        return physicalPath;
    }

    /**
     * @param physicalPath the physicalPath to set
     */
    public void setPhysicalPath(String physicalPath) {
        this.physicalPath = physicalPath;
    }
}
